<template>
  <div>
    <el-form
      :inline="true"
      ref="fromdata"
      :model="fromdata"
      label-width="90px"
    >
      <el-row class="">
        <el-col :span="22">车辆信息</el-col>
      </el-row>
      <el-divider content-position="center"></el-divider>
      <el-row>
        <el-col :span="8">
          <el-form-item label="车牌号:">
            <div>{{fromdata.licensePlateNumber}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="VIN码:">
            <div>{{fromdata.vin}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="车型:">
            <div>{{fromdata.carModelName}}</div>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="车辆属性:">
            <div>{{fromdata.carAttribute}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="车辆颜色:">
            <div>{{fromdata.carColor}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="当前里程:">
            <div>{{fromdata.mileage}}</div>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="发动机号:">
            <div>{{fromdata.engineNumber}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="注册时间:">
            <div>{{fromdata.examinedDate}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="保险公司:">
            <div>{{fromdata.companyName}}</div>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="保险投保期:">
            <div>{{froms.insureDate}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="保险到期:">
            <div>{{froms.insureExpireDate}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="年审到期:">
            <div>{{froms.examinedDate}}</div>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
         <el-col :span="8">
          <el-form-item label="创建日期:">
            <div>{{fromdata.createTime}}</div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="备注:">
            <div>{{fromdata.clientName}}</div>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
import baseMixin from '@/mixins/base'
import { parseTime } from "@/utils";
export default {
  name: 'carInfo',
  components: {},
  props: {
    fromdata: {
      type: Object,
      default: () => ({})
    }
  },
  mixins: [baseMixin({})],
  data() {
    return {
      froms: {
        insureDate: this.fromdata.insureDate ? parseTime(this.fromdata.insureDate) : '',
        insureExpireDate: this.fromdata.insureExpireDate ? parseTime(this.fromdata.insureExpireDate) : '',
        examinedDate: this.fromdata.examinedDate ? parseTime(this.fromdata.examinedDate) : ''
      }
    }
  },
  async created () {
  },
  methods: {
    changeType (item) {
      this.selectedTypeText = item.label;
    },
  },
  mounted () {
  }
}
</script>

<style lang="scss" scoped>
.el-table .delete-row {
  background: #f5f7fa;
  color: #ccc !important;
}
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 80px;
  height: 80px;
  display: block;
}
</style>
